﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using DoeLibsMVC.Security;
using DoeLibsMVC.Models;

namespace DoeLibsMVC.Controllers
{
    public class UserController : BaseController
    {

        [Authorize]
        public ActionResult Controll()
        {
            return View(new EditUserModel(User));
        }

        [Authorize(Roles=UserCategoryHelper.STUDENT_CATEGORY)]
        public ActionResult RenewExpireDate()
        {
            return View(new RenewExpireDateModel());
        }

        [Authorize(Roles = UserCategoryHelper.STAFF_CATEGORY)]
        public ActionResult MyLoanables()
        {
            return View();
        }

        [Authorize]
        public ActionResult MyBorrowings()
        {
            return View();
        }

        [Authorize(Roles = UserCategoryHelper.STAFF_CATEGORY)]
		[HttpGet]
		public ActionResult ManageUsers()
		{
			return View();
		}

		[Authorize(Roles = UserCategoryHelper.STAFF_CATEGORY)]
		[HttpGet]
		public ActionResult UserDelete(int id)
		{
			ViewBag.DeleteUserId = id;
			return View(new Models.UserDeleteModel(id));
		}
    }
}
